package com.antgroup.seckill.business.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.ToString;

/**
 * @author wangxy
 * @date 2024/7/25 22:34
 */
@Getter
@ToString
@AllArgsConstructor
public enum RespBeanEnum {

    //通用
    SUCCESS(200,"SUCCESS"),
    ERROR(500,"服务端异常"),
    //登录
    LOGIN_ERROR(500201,"用户名或者密码不正确"),
    MOBILE_ERROR(500202,"手机号码不正确"),

    BIND_ERROR(500203,"参数校验异常"),

    EMPTY_STOCK(500204,"库存不足"),
    REPEATE_ERROR(500205,"该商品每人限购一件"),

    NOT_LOGIN(500206,"用户未登录"),

    ILLEGAL_LOGIN(500206,"非法登录"),

    //订单类

    ORDER_NOT_EXIST(500301,"订单不存在"),
    SECKILL_SUCCESS(500302,"秒杀成功"),

    SECKILL_FAIL(500303,"秒杀失败"),

    CAPTCH_ERROR(500304,"验证码错误"),

    REQUEST_NUMBER_LIMIT(500305,"访问过于频繁请稍后重试"),


    GOODS_NOT_EXIST(500401,"商品不存在"),

    ES_ERROR(500402,"ES查询异常"),

    ;

    private final Integer code;

    private final String message;
}
